//导入vue-router包
import VueRouter from 'vue-router'

//导入 tabbar 中的路由组件
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MenberContainer from './components/tabbar/MenberContainer.vue'
import ShoppingCartContainer from './components/tabbar/ShoppingCartContainer.vue'
import PersonContainer from './components/tabbar/PersonContainer.vue'
import NewsList from './components/news/NewsList.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import PhotosList from './components/photos/photosList.vue'
import PhotosInfo from './components/photos/photosInfo.vue'
import GoodsList from './components/goods/goodsList.vue'
import GoodsInfo from './components/goods/goodsInfo.vue'
import GoodsDesc from './components/goods/goodsDesc.vue'
import GoodsComment from './components/goods/goodsComment.vue'
import VideosList from './components/videos/VideosList.vue'

//创建路由对象
var router = new VueRouter({
    routes: [
        { path: '/', redirect: '/home' },
        { path: '/home', component: HomeContainer },
        { path: '/menber', component: MenberContainer },
        { path: '/shoppingcart', component: ShoppingCartContainer },
        { path: '/person', component: PersonContainer },
        { path: '/home/newsList', component: NewsList },
        { path: '/home/newsInfo/:id', component: NewsInfo },
        { path: '/home/photosList', component: PhotosList },
        { path: '/home/photosInfo/:id', component: PhotosInfo },
        { path: '/home/goodsList', component: GoodsList },
        { path: '/home/goodsInfo/:id', component: GoodsInfo },
        { path: '/home/goodsdesc/:id', component: GoodsDesc, name: 'goodsDesc' },
        { path: '/home/goodscomment/:id', component: GoodsComment, name: 'goodsComment' },
        { path: '/home/videosList', component: VideosList }

    ],
    linkActiveClass: "mui-active"//覆盖路由高亮的类
})

//把路由对象暴露出去

export default router
